/**
 * @author 赵希奥
 * @date 2022/4/20 12:41
 * @gitHub https://github.com/CKXGZXA
 * @gitee https://gitee.com/ckxgzxa
 * @description:
 */
public class Client {
    public static void main(String[] args) {
        MultiMedia multiMedia1, multiMedia2, multiMedia3;
        MultiMediaFactory factory;

        // 获取享元工厂对象
        factory = MultiMediaFactory.getInstance();

        // 通过享元工厂获取享元对象
        multiMedia1 = factory.getMultiMedia("image");
        multiMedia2 = factory.getMultiMedia("video");
        multiMedia3 = factory.getMultiMedia("animation");

        // 显示享元对象的状态
        multiMedia1.display(new Style("image", "top", "medium"));
        multiMedia2.display(new Style("video", "bottom", "large"));
        multiMedia3.display(new Style("animation", "left", "small"));


    }
}
